//
//  XWSettingSwitchItem.m
//  CGWSWW
//
//  Created by lanou3g on 16/8/13.
//  Copyright © 2016年 CXG. All rights reserved.
//

#import "XWSettingSwitchItem.h"


@implementation XWSettingSwitchItem
-(UISwitch*)settingSwitch{
    if (!_settingSwitch) {
        _settingSwitch = [[UISwitch alloc]init];
        _settingSwitch.onTintColor = [UIColor darkGrayColor];
    }
    return _settingSwitch;
}
+ (instancetype)itemWithtemWithIcon:(NSString *)icon title:(NSString *)title Target:( id)target action:(SEL)action forControlEvents:(UIControlEvents)controlEvents{
    XWSettingSwitchItem *item =[XWSettingSwitchItem itemWithIcon:icon title:title];
    [item.settingSwitch addTarget:target action:action forControlEvents:controlEvents];
    return item;
}
@end
